gdkevent: Hold refs to device/source_device
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 3 Aug 2015 15:22:29 +0000 (17:22 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Aug 2015 20:13:08 +0000 (22:13 +0200)
commit25557c1c5d977acb5659e13394961524b67c2ec0
tree0c1e2a5d8fe4c111c62a0e8d89beddbf94a4746c
parent8599f209c1a0c766429429275027284491ded7ac
gdkevent: Hold refs to device/source_device

The extra reference will be held from GdkEventPrivate data, so there's
a common place to all events. Without this, events queued after devices/
capabilities disappear (eg. on TTY switch) might hold invalid pointers.
Windowing level operations on those devices (queries, grabs...) are
expected to fail at that time, but we should hold meaningful data for
the regular event handling paths.

https://bugzilla.gnome.org/show_bug.cgi?id=753185
gdk/gdkevents.c